import * as API from "./api.js";

export default {
  // 用户列表
  adminUserList: params => {
    return API.GET("/user/adminUserList", params, null, 1);
  },
  add_normal_user: params => {
    return API.POST("/user/add_normal_user", params, null, 1);
  },
  add_normal_user_my: params => {
    return API.POST("/user/add_normal_user_my", params, null, 1);
  },
  status_normal: params => {
    return API.POST("/user/status_normal", params, null, 1);
  },
  changePassword: params => {
    return API.POST("/user/changePassword", params, null, 1);
  },
  getUserPermissionList: params => {
    return API.POST("/user/getUserPermissionList", params, null, 1);
  },
  upPermission: params => {
    return API.POST("/user/upPermission", params, null, 1);
  },
  getEditUserRoleList: params => {
    return API.POST("/user/getEditUserRoleList", params, null, 1);
  },

  // 所有角色列表，筛选使用
  getAllRoleList: params => {
    return API.POST("/user/getAllRoleList", params, null, 1);
  },

  // 账号详情
  normal_user_detail: params => {
    return API.POST("/user/normal_user_detail", params, null, 1);
  },







  roleList: params => {
    return API.POST("/user/roleList", params, null, 1);
  },
  upRole: params => {
    return API.POST("/user/upRole", params, null, 1);
  },
  delRole: params => {
    return API.POST("/user/delRole", params, null, 1);
  },
  upRolePermission: params => {
    return API.POST("/user/upRolePermission", params, null, 1);
  },
  getRolePermissionList: params => {
    return API.POST("/user/getRolePermissionList", params, null, 1);
  },
  doDisenableRole: params => {
    return API.POST("/user/doDisenableRole", params, null, 1);
  },
  //导出用户列表
  getExportCompanyUserList: params => {
    return API.POSTFILE("/user/getExportCompanyUserList", params,  "application/json", true);
  },
  //导出角色列表
  getExportRoleList: params => {
    return API.POSTFILE("/user/getExportRoleList", params,  "application/json", true);
  },
  getAllCustomRoleList: params => {
    return API.POST("/user/getAllCustomRoleList", params, null, 1);
  },


  //省市区
  get_province: params => {
    return API.POST("/user/get_province", params);
  },
  get_city: params => {
    return API.POST("/user/get_city", params);
  },
  get_district: params => {
    return API.POST("/user/get_district", params);
  },



  //导出
  exportParam: params => {
    return API.POSTFILE("/user/exportParam", params,  "application/json", false);
  },


  
  doAddAdminUser: params => {
    return API.POST("/user/doAddAdminUser", params, null, 1);
  },
  doUpAdminUser: params => {
    return API.POST("/user/doUpAdminUser", params, null, 1);
  },
  doUpAdminUserStatus: params => {
    return API.POST("/user/doUpAdminUserStatus", params, null, 1);
  },
  doBindNormalUser: params => {
    return API.POST("/user/doBindNormalUser", params, null, 1);
  },
  getChooseAdminUserList: params => {
    return API.GET("/user/getChooseAdminUserList", params, null, 1);
  },
};
